<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:76:"/www/wwwroot/crm.liunuo.net/public/../application/user/view/index/info.phtml";i:1552999927;s:60:"/www/wwwroot/crm.liunuo.net/application/user/view/base.phtml";i:1552999924;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title><?php echo config('website.site_name')?></title>
    <link rel="stylesheet" href="/static/libs/layui/css/layui.css">
    <link rel="stylesheet" href="/static/css/base.css">
    <link rel="stylesheet" href="/static/css/fonts.css">
    
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header layui-bg-black">
        <div class="layui-logo"><img src="/static/user/images/logo.png" class="head-logo"></div>
        <ul class="layui-nav layui-layout-left">
            <?php if(is_array($navbar) || $navbar instanceof \think\Collection || $navbar instanceof \think\Paginator): if( count($navbar)==0 ) : echo "" ;else: foreach($navbar as $key=>$v): ?>
            <li class="layui-nav-item <?php if(isset($breadcrumb['0']) and $breadcrumb['0'] == $v['name']): ?>layui-this<?php endif; ?>">
                <a href="<?php echo \think\Request::instance()->root(true); ?>/<?php if(empty($v['url'])): ?><?php echo $v['children']['0']['url']; else: ?><?php echo $v['url']; endif; ?>"><i class="<?php echo $v['icon']; ?>"></i> <?php echo $v['name']; ?></a>
            </li>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item"><a href="/" target="_blank"><i class="fa fa-home"></i> 网站首页</a></li>
            <?php $remind_sum= today_remind_sum();?>
            <li class="layui-nav-item" style="text-align: right;"><a href="/user/customer/remind/"><i class="fa fa-bell"></i> 提醒消息 <span class="layui-badge"><?php echo $remind_sum['count']; ?></span></a></li>
            <li class="layui-nav-item">
                <a href="javascript:;"><i class="fa fa-user"></i> <?php if(session('user_auth.realname')): ?><?php echo session('user_auth.realname'); else: ?><?php echo session('user_auth.username'); endif; ?></a>
                <dl class="layui-nav-child">
                    <dd><a href="<?php echo url('user/index/editPassword'); ?>">修改密码</a></dd>
                    <dd><a href="<?php echo url('user/index/logout'); ?>">退出登录</a></dd>
                </dl>
            </li>
        </ul>
    </div>
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree">
                <li class="layui-nav-item"><a href="<?php echo url('user/index/index'); ?>"><i class="fa fa-home fa-fw"></i> 系统首页</a></li>
                <?php if(is_array($navbar) || $navbar instanceof \think\Collection || $navbar instanceof \think\Paginator): if( count($navbar)==0 ) : echo "" ;else: foreach($navbar as $key=>$n0): if(isset($n0['children']) and isset($breadcrumb['0']) and $breadcrumb['0'] == $n0['name']): if(is_array($n0['children']) || $n0['children'] instanceof \think\Collection || $n0['children'] instanceof \think\Paginator): if( count($n0['children'])==0 ) : echo "" ;else: foreach($n0['children'] as $key=>$n1): ?>
                <li class="layui-nav-item <?php if(isset($breadcrumb['1']) and $breadcrumb['1'] == $n1['name']): if(isset($n1['children'])): ?>layui-nav-itemed<?php else: ?>layui-this<?php endif; endif; ?>">
                    <a href="<?php if(isset($n1['children'])): ?>javascript:;<?php else: ?><?php echo \think\Request::instance()->root(true); ?>/<?php echo $n1['url']; endif; ?>"><i class="<?php echo $n1['icon']; ?> fa-fw"></i> <?php echo $n1['name']; ?></a>
                    <?php if(isset($n1['children'])): ?>
                    <dl class="layui-nav-child">
                        <?php if(is_array($n1['children']) || $n1['children'] instanceof \think\Collection || $n1['children'] instanceof \think\Paginator): if( count($n1['children'])==0 ) : echo "" ;else: foreach($n1['children'] as $key=>$n2): ?>
                        <dd<?php if(isset($breadcrumb['2']) and $breadcrumb['2'] == $n2['name']): ?> class="layui-this"<?php endif; ?>><a href="<?php echo \think\Request::instance()->root(true); ?>/<?php echo $n2['url']; ?>"><?php echo $n2['name']; ?></a></dd>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </dl>
                    <?php endif; ?>
                </li>
                <?php endforeach; endif; else: echo "" ;endif; endif; endforeach; endif; else: echo "" ;endif; ?>
            </ul>
        </div>
    </div>
    <div class="layui-breadcrumb">
        <?php if(isset($breadcrumb)): if(is_array($breadcrumb) || $breadcrumb instanceof \think\Collection || $breadcrumb instanceof \think\Paginator): if( count($breadcrumb)==0 ) : echo "" ;else: foreach($breadcrumb as $key=>$v): ?>
        <a><cite><?php echo $v; ?></cite></a>
        <?php endforeach; endif; else: echo "" ;endif; endif; ?>
    </div>
    <div class="layui-body">
        
<div class="layui-card">
    <div class="layui-card-header">编辑数据</div>
    <div class="layui-card-body">
        <form action="<?php echo request()->url(); ?>" class="layui-form" method="post">
            <div class="layui-form-item">
                <label class="layui-form-label">* 用户名</label>
                <div class="layui-input-inline">
                    <input type="text" disabled="" value="<?php echo (isset($data['username']) && ($data['username'] !== '')?$data['username']:''); ?>" autocomplete="off" placeholder="请输入用户名" lay-verify="required" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">用户名暂不可修改，如需修改请联系官方</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">* 用户昵称</label>
                <div class="layui-input-inline">
                    <input type="text" name="realname" value="<?php echo (isset($data['realname']) && ($data['realname'] !== '')?$data['realname']:''); ?>" autocomplete="off" placeholder="" lay-verify="required" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">用户昵称</div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">* 手机号</label>
                <div class="layui-input-inline">
                    <input type="text" name="mobile" id="mobile" value="<?php echo (isset($data['mobile']) && ($data['mobile'] !== '')?$data['mobile']:''); ?>" autocomplete="off" placeholder="请输入手机号" lay-verify="phone|number" class="layui-input">
                </div>
                <!--div class="layui-inline">
                    <input id="code1" type="text" name="code" class="layui-input" autocomplete="off" placeholder="短信验证码"  style="width: 100px;"/>
                </div>
                <div class="layui-inline">
                    <input id="btnSendCode1" type="button" class="layui-btn layui-btn-warm verifyImg" value="获取验证码" onClick="sendMessage1()"/>
                </div-->
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">* E-mail</label>
                <div class="layui-input-inline">
                    <input type="text" name="email" id="email" value="<?php echo (isset($data['email']) && ($data['email'] !== '')?$data['email']:''); ?>" autocomplete="off" placeholder="请输入E-mail" class="layui-input">
                </div>
            </div>
            
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-filter="*" lay-submit="">保存</button>
                    <button class="layui-btn layui-btn-primary" type="reset">重置</button>
                </div>
            </div>
        </form>
    </div>
</div>
<script src="/static/libs/layui/layui.all.js"></script>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/layui.base.js"></script>
<script type="text/javascript">
        var phoneReg = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/;//手机号正则 
        var count = 60; //间隔函数，1秒执行
        var InterValObj1; //timer变量，控制时间
        var curCount1;//当前剩余秒数
        /*第一*/
        function sendMessage1() {
                curCount1 = count;		 		 
                var phone = $.trim($('#mobile').val());
                if (!phoneReg.test(phone)) {
                        alert(" 请输入有效的手机号码"); 
                        return false;
                }
                $.ajax({
                    type: "POST",      //data 传送数据类型。post 传递
                    dataType: 'json',  // 返回数据的数据类型json
                    url: "/user/index/captcha_sms",  // yii 控制器/方法
                    cache: false,      
                    data: {mobile: phone},  //传送的数据
                    error:function(){
                       alert("数据传输错误");
                    },success: function (data) {
                        if(window.console){
                            console.log(data);
                        }else{
                            console.log(data);
                        }
                    }
                });      

                //设置button效果，开始计时
                $("#btnSendCode1").attr("disabled", "true");
                $("#btnSendCode1").val( + curCount1 + "秒再获取");
                InterValObj1 = window.setInterval(SetRemainTime1, 1000); //启动计时器，1秒执行一次
                //向后台发送处理数据

        }
        function SetRemainTime1() {
                if (curCount1 == 0) {                
                        window.clearInterval(InterValObj1);//停止计时器
                        $("#btnSendCode1").removeAttr("disabled");//启用按钮
                        $("#btnSendCode1").val("重新发送");
                }
                else {
                        curCount1--;
                        $("#btnSendCode1").val( + curCount1 + "秒再获取");
                }
        } 

        /*提交*/
        function binding(){
                alert(1)
        }
</script>

    </div>
</div>

<script src="/static/libs/layui/layui.all.js"></script>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/layui.base.js"></script>
<script src="/static/js/multiSelect.js"></script>
<script src="/static/js/common.js"></script>

<?php if($remind_sum['web'] > '0'): ?>
<script type="text/javascript">
    layer.msg('今日您有 <?php echo $remind_sum['count']; ?> 条信息待处理', {
            offset:'t',
            time: 5000, //不自动关闭
            btn: ['立即处理', '稍后处理'],
            yes: function(index){
                layer.close(index);
                window.location.href='/user/customer/remind/';
            }
        }
    );
</script>
<?php endif; ?>
</body>
</html>